from PyQt5.QtWidgets import QWidget, QLineEdit, QHBoxLayout
from PyQt5.QtCore import pyqtSignal

class UrlInputBar(QWidget):
    url_submitted = pyqtSignal(str)
    
    def __init__(self):
        super().__init__()
        self.init_ui()
        
    def init_ui(self):
        layout = QHBoxLayout()
        self.url_input = QLineEdit(placeholderText="请输入CSDN/百度文库/知乎URL")
        self.url_input.setStyleSheet("""
            QLineEdit {
                padding: 8px;
                border: 1px solid #4A4A4A;
                border-radius: 4px;
                min-width: 400px;
            }
        """)
        layout.addWidget(self.url_input)
        self.setLayout(layout)